package vip.xiaonuo.device.modular.controller;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import vip.xiaonuo.device.modular.service.TencentMinCardService;
import vip.xiaonuo.device.vo.Result;

import javax.annotation.Resource;

@Slf4j
@Api(tags = "腾讯微卡接口")
@ApiSupport(author = "SNOWY_TEAM", order = 1)
@RestController
@Validated
public class TencentMinCardController {

    @Resource
    private TencentMinCardService tencentMinCardService;

    @ApiOperationSupport(order = 1)
    @ApiOperation("微卡获取身份")
    @PostMapping("/api/txwk/getuserinfobycode")
    public Result getuserinfobycode(@RequestBody String code) {
        log.info(code);
        return tencentMinCardService.getuserinfobycode(code);
    }
}
